//
//  YYJLMonthlyTestController.m
//  YuanyangJinlou
//
//  Created by mac004 on 2017/1/9.
//  Copyright © 2017年 suli19910309@qq.com. All rights reserved.
//

#import "YYJLMonthlyTestController.h"
#import "YYJLMonthlyTestCell.h"
#import "YYJLTestController.h"
@interface YYJLMonthlyTestController ()<UITableViewDataSource,UITableViewDelegate>
{
    UITableView * _tableview;
}
@end

@implementation YYJLMonthlyTestController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setTitleView:@"月考"];
    [self setBackItem];
    [self creatUI];
}

-(void)creatUI{
    _tableview =[[UITableView alloc]initWithFrame:CGRectMake(0,9*PER_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT-9*PER_HEIGHT) style:UITableViewStylePlain];
    _tableview.backgroundColor=[UIColor clearColor];
    _tableview.dataSource=self;
    _tableview.delegate=self;
    _tableview.separatorStyle=UITableViewCellSeparatorStyleNone;
    [self.view addSubview:_tableview];
}
#pragma mark--tableview
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPathP{
    YYJLTestController * test =[[YYJLTestController alloc]init];
   
    test .testType = MonthlyTest;
    [self.navigationController pushViewController: test animated:YES];
    
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 131*PER_HEIGHT;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    YYJLMonthlyTestCell* cell=[tableView dequeueReusableCellWithIdentifier:@"cel"];
    if (!cell) {
        cell=[[YYJLMonthlyTestCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }
    cell.backgroundColor=[UIColor clearColor];
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    cell.isMonthly=YES;
    return cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
